<html>
    <head>
        <script src="js/snowstorm/snowstorm-min.js"></script>
        <title>Fahion shop</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <link href="css/style.css" type="text/css" rel="stylesheet"/>
        <link href="css/huongdan.css" type="text/css" rel="stylesheet"/>
        <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.0.js"></script>
    </head>
    <body style="cursor: url(http://cur.cursors-4u.net/nature/nat-1/nat13.png),progress;">
        <div id="wrapper">
            <?php include 'template/header.php' ?>
            <?php
            require_once 'Connect_db.php';
            if (isset($_SESSION['cus'])) {
                $id = $_SESSION['cus']['cus_id'];
                if (isset($_POST['btnSend'])) {
                    $txtComment = $_POST['txtComment'];
                    $kq =CommentUser($id,$txtComment);
                    if ($kq) {//Nếu $kq bằng true tức là chèn thành công
                        ?>
            <span ><script>alert('Bạn gửi thành công')</script></span>
                        <?php
                    } else {//Nếu không thi
                        ?>
            <span><script>alert('Bạn gửi không thành công')</script></span><!--popup-->
                        <?php
                    }
                }
            ?>
            <div id="main">
                <form action="huongdan.php" method="post">

                    <textarea name="txtComment" ></textarea>
                    <input type="submit" value="" name="btnSend" id="showBox"/>
                </form>


            </div>
            <?php
            } else {

                ?>
            <span ><script>
                alert('Bạn chưa đăng nhập')
                window.location.assign("login-register.php");
                </script></span>

                <?php
            }

            ?>
            <div class="dim"></div>

           

            <?php include 'template/footer.php' ?>

        </div>
    </body>
</html>